<?php 

namespace app\common\validate\single;

use think\Validate;

class SysSingleBadgeConfig extends Validate 
{ 
    protected $rule = [
        'width' => 'require',
        'height' => 'require',
        'image_x' => 'require',
        'image_y' => 'require',
        'image_width' => 'require',
        'image_height' => 'require',
        'name_x' => 'require',
        'name_y' => 'require',
        'post_x' => 'require',
        'post_y' => 'require',
        'department_x' => 'require',
        'department_y' => 'require',
        'card_number_x' => 'require',
        'card_number_y' => 'require',
        'qrcode_x' => 'require',
        'qrcode_y' => 'require',
        'qrcode_width' => 'require',
        'qrcode_height' => 'require',
        'background_image' => 'require',
        'font_size' => 'require',
    ];

    protected $message = [
        'width.require' => '请输入页面宽度',
        'height.require' => '请输入页面高度',
        'image_x.require' => '请输入照片x偏移',
        'image_y.require' => '请输入照片y偏移',
        'image_width.require' => '请输入照片宽度',
        'image_height.require' => '请输入照片高度',
        'name_x.require' => '请输入姓名x偏移',
        'name_y.require' => '请输入姓名y便宜',
        'post_x.require' => '请输入岗位x偏移',
        'post_y.require' => '请输入岗位y偏移',
        'department_x.require' => '请输入部门x偏移',
        'department_y.require' => '请输入部门y偏移',
        'card_number_x.require' => '请输入工号x偏移',
        'card_number_y.require' => '请输入工号y偏移',
        'qrcode_x.require' => '请输入二维码x偏移',
        'qrcode_y.require' => '请输入二维码y偏移',
        'qrcode_width.require' => '请输入二维码宽度',
        'qrcode_height.require' => '请输入二维码高度',
        'background_image.require' => '请上传模板背景',
        'font_size.require' => '请输入字体大小',
    ];

    protected $scene = [
        'edit' => ['width','height','image_x','image_y','image_width','image_height','name_x','name_y','post_x','post_y','department_x','department_y','card_number_x','card_number_y','qrcode_x','qrcode_y','qrcode_width','qrcode_height','background_image','font_size','admin_name','remark','id'],
        'add' => ['width','height','image_x','image_y','image_width','image_height','name_x','name_y','post_x','post_y','department_x','department_y','card_number_x','card_number_y','qrcode_x','qrcode_y','qrcode_width','qrcode_height','background_image','font_size','admin_name','remark'],
    ];

} 
